<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/opportunity-list.php");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>
</head>

<body>

<div id="topbar">   <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?></div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>




<div id="content">
<h1>商机列表 </h1>




<div class="select-box layui-form">
<form action="unit-list.php" >

    <div class="layui-form-item">
        <label class="layui-form-label">关键词</label>
        <div class="layui-input-block">
            <input type="text" name="select_keywords" placeholder="标题，姓名，备注，电话" autocomplete="off" class="layui-input" value="<? echo $_REQUEST['select_keywords']?>" >
        </div>
    </div>






    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <select name="select_graduate">
                <?if($_REQUEST['select_status']){echo "<option value='".$_REQUEST['select_status']."'>".$_REQUEST['select_status']."</option>";}?>
                <option value="全部">全部</option>
                <option value="正常">正常</option>
                <option value="休业">休业</option>
                <option value="结业">结业</option>
                <option value="半结业">半结业</option>

            </select>
        </div>
    </div>







    <button class="layui-btn" ><i class="layui-icon">&#xe615;</i> 查找</button>
    <a class="layui-btn" href="<?echo $domain?>/controlbase/unit/detail-list.php?nav-itemed=unit" ><i class="layui-icon">&#x1006;</i> 重置</a>

    <br class="clearfloat"/>
</form>

    <br class="clearfloat"/>
</div>





<div class="list-box">
    <hr/>


<div class="list-boxes layui-form">



<table class="layui-table">
  <colgroup>
        <col width="50">
        <col width="280">
        <col >
        <col >
        <col >
        <col width="150">
        <col >
        <col >
        <col >
        <col width="80">
        <col >
        <col width="280">

  </colgroup>
  <thead>
    <tr>
        <th>头像</th>
      <th>名称</th>
      <th>法人</th>
      <th>项目数</th>
      <th>项目金额</th>
      <th>地址</th>
      <th>评级</th>
      <th>标签</th>
      <th>开发者</th>
      <th>性质</th>
      <th>状态</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>




	<?php
	for ($i = 0; $i < $detailnum; $i++) {
    ?>


        <tr id="item<?echo $detail[$i]['nid']?>"  >

        <td>
        <div class="icon" style="background-image: url('/uploadfiles/<?echo $detail[$i]['icon']?>')"></div>
        </td>
        <td>
          <? if(count_by_item($table_Prefix."member", "unit= '".$detail[$i]['nid']."'") == 0){ ?>
              <i class="fa fa-exclamation-triangle" style="color: #fdd305;" aria-hidden="true" id="triangle_<?php echo $detail[$i]['nid']?>" onmouseover="show_remark ('没有联系人','triangle_<?php echo $detail[$i]['nid']?>')"></i>
          <? }?>
          <?echo $detail[$i]['sname']?>
            <span style="font-size: 12px; color: #666666"> (<?echo $detail[$i]['name']?>) </span></td>
      <td><?echo $detail[$i]['faren']?></td>
      <td>
          <?echo count_by_item($table_Prefix."case","unit='".$detail[$i]['nid']."' and status = '进行中'")?> /
          <?echo count_by_item($table_Prefix."case","unit='".$detail[$i]['nid']."' and (status = '进行中' or status = '完成' )")?></td>


      <td>
          <?echo sum_total($table_Prefix."case","sum","unit='".$detail[$i]['nid']."' and status = '完成'")?> /
          <?echo sum_total($table_Prefix."case","sum","unit='".$detail[$i]['nid']."' and (status = '进行中' or status = '完成' )")?>
      </td>


            <td >
                <? if(($detail[$i]['address'])and($detail[$i]['address']!="  ")){ ?>
                    <span id="addr_<?php echo $detail[$i]['nid']?>" onmouseover="show_remark ('<?php echo $detail[$i]['address']?>','addr_<?php echo $detail[$i]['nid']?>')" >
              <?
              $conditon['str']=str_replace(array('恩平市','广东省'),"",$detail[$i]['address']);
              $conditon['len']=6;
              $conditon['from']=0;
              echo utf8_substr($conditon)."..."?></span>
                    <?;}?>

            </td>


      <td><?echo $detail[$i]['rank']?></td>
      <td><?echo $detail[$i]['tag']?></td>

<!--        <td>-->
<!--            --><?//
//            $agent=select_one_line_all_items($table_Prefix."member","nid = '".$detail[$i]['informant']."'");
//            if(!empty($detail[$i]['informant'])){
//            echo $detail[$i]['informant']." : ".$agent['name'];
//            }
//            ?>
<!--        </td>-->
        <td>
            <?
            $developer=select_one_line_all_items($table_Prefix."employee","nid = '".$detail[$i]['developer']."'");
            if(!empty($detail[$i]['developer'])){
                echo $developer['name'];
            }
            ?>
        </td>

      <td><?echo $detail[$i]['type']?></td>
      <td><?echo $detail[$i]['status']?></td>

	  <td>



<a href="detail-statistic.php?&nid=<? echo $detail[$i]['nid']?><?echo $pagenumber_url.$sortby_url.$navitemed_url.$system_part.$term_nid ?><?echo $url_str?>" class="layui-btn  layui-btn-sm" target="_blank vftg bgcbcbc" ><i class="layui-icon">&#xe621;</i> 信息</a>






  <a href="detail-edit.php?nid=<? echo $detail[$i]['nid']?><?echo $pagenumber_url.$sortby_url.$navitemed_url.$system_part.$term_nid ?>" class="layui-btn  layui-btn-sm" >
    <i class="layui-icon">&#xe642;</i> 修改
  </a>




 

<? if(in_array("admin",$quanxian)){?>
<a href="javascript:void(0)" onclick="delItem (<?php echo $detail[$i]['nid']?>)" 
   class="delete layui-btn  layui-btn-sm" >
    <i class="layui-icon">&#xe640;</i> 删除 
</a>


<?if($applymodify){?>
<a href="detail-verify.php?nav-itemed=<?echo $system_part?>&nid=<? echo $detail[$i]['nid']?>" class="layui-btn  layui-btn-sm"> 审核</a>
<?}?>

<?}?>


  </td>
    </tr>
  <?php

}
?>


  </tbody>
</table>






</div>


<div class="list-box-function"
<? if ($detailnum == 0) {
    echo "style" . "='display:none'";
} ?>
>

    <?php include 'page_numbers.php'; ?>

</div>




<!--list-box end-->
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>








<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>
</html>
